import java.sql.SQLException;
import java.util.Date;

import models.Client;
import models.Payment;
import models.Subscription;
import models.Workshop;
import models.Workshop.DagDeel;
import database.MySQLServer;
import database.SQLServer;
import databasetranslation.ClientList;
import databasetranslation.PaymentList;
import databasetranslation.SubscriptionList;
import databasetranslation.WorkshopList;


public class FillDatabaseBig {
	@SuppressWarnings("deprecation")
	public static void main(String[] args) throws SQLException {
		SQLServer server = new MySQLServer("localhost","root","usbw");
	
		ClientList clients = new ClientList(server);
		clients.clearDatabaseTable();
		Client c1 = new Client("Bart", "Spencer", "Myroad 16, 28240 MyCity", "06 390 444 34", "markspancer@gmail.com");
		Client c2 = new Client("Achiel", "flap", "Myop 16, 28240 youCity", "06 974 367 34", "flipflap@gmail.com");
		Client c3 = new Client("Camiel", "flup", "Mioup 16, 2854 flapCity", "06 333 856 34", "camielflup@gmail.com");
		Client c4 = new Client("Kees", "Konijn", "drebbelweg 23, Delft", "06 390 224 34", "klant1@gmail.com");
		Client c5 = new Client("Klaas", "flap", "Een doos onder de Abwoudsebrug", "06 746 452 34", "klant2@gmail.com");
		Client c6 = new Client("mart", "De koning", "Stationsplein 32, Rotterdam", "06 852 322 34", "klant5@gmail.com");
		Client c7 = new Client("Lars", "Paard", "Bruggen 21, Brugstad", "06 457 344 47", "gekkelars@gmail.com");
		Client c8 = new Client("Wendy", "Morgen", "drebbelweg 23, Delft", "06 974 452 32", "morgendrebbel@gmail.com");
		Client c9 = new Client("Camiel", "Debiel", "Rotterdamseweg 342, Delft", "06 853 322 66", "1990_2314@gmail.com");
		Client c10 = new Client("Cisley", "De boer", "Knorrepad 23, Pijnacker", "06 390 2432 64", "c!5L37_4E@gmail.com");
		Client c11 = new Client("Ilona", "Telaat", "drebbelweg 23, Delft", "06 974 452 82", "2135@gmail.com");
		Client c12 = new Client("Uub", "kuub", "Rotterdamseweg 342, Delft", "06 932 600 99", "yerery@gmail.com");
		Client c13 = new Client("Klaas", "flip", "Een doos onder de andere brug", "06 000 452 34", "wertgdcv@gmail.com");
		Client c14 = new Client("mart", "van den berg", "Verweg", "06 872 302 99", "sakjsdlj@gmail.com");
		Client c15 = new Client("Lars", "roeien", "Californie 21, Brugstad", "06 333 333 47", "06333333347@gmail.com");
		Client c16 = new Client("Ramona", "Overmorgen", "Vliegenstraat 23, Delft", "06 334 452 32", "vlieger@gmail.com");
		Client c17 = new Client("Karbonkel", "zondag", "Patersweg 342, Delft", "06 853 342 66", "lalala@gmail.com");
		Client c18 = new Client("Tessa", "zaterdag", "Mahonie 23, Pijnacker", "06 390 262 74", "po@gmail.com");
		Client c19 = new Client("Yvonne", "Oliebol", "Ooievaarstraat 23, Delft", "06 974 452 82", "giftig@gmail.com");
		Client c20 = new Client("luub", "Taartenbakker", "Albert canis-erf 342, Delft", "06 546 677 99", "adhd@gmail.com");
		
		clients.add(c1);clients.add(c2);clients.add(c3);clients.add(c4);clients.add(c5);
		clients.add(c6);clients.add(c7);clients.add(c8);clients.add(c9);clients.add(c10);
		clients.add(c11);clients.add(c12);clients.add(c13);clients.add(c14);clients.add(c15);
		clients.add(c16);clients.add(c17);clients.add(c18);clients.add(c19);clients.add(c20);
		
		WorkshopList workshops = new WorkshopList(server);
		workshops.clearDatabaseTable();
		Date now = new Date();
		Date future = new Date(111,01,31);
		Date future2 = new Date(111,02,07);
		Date future3 = new Date(111,02,18);
		Date future4 = new Date(111,02,19);
		Date future5 = new Date(111,02,23);
		
		DagDeel vm1 = DagDeel.VOORMIDDAG;
		DagDeel vm2 = DagDeel.NAMIDDAG;
		Workshop w1 = new Workshop("Alles maken", future, vm1, 10.0, "explanation1", 10, "docent1");
		Workshop w2 = new Workshop("Canon zingen", future, vm1, 12.0, "explanation2", 2, "docent2");
		Workshop w3 = new Workshop("Poep scheppen", future, vm1, 15.0, "explanation3", 10, "docent1");
		Workshop w4 = new Workshop("Hond uitlaten", now, vm1, 32.0, "explanation4", 100, "docent2");
		Workshop w5 = new Workshop("Schilderen", now, vm1, 10.0, "explanation5", 10, "docent1");
		Workshop w6 = new Workshop("Niets doen", now, vm1, 22.0, "explanation6", 100, "docent2");
		Workshop w7 = new Workshop("Programmeren", future2, vm1, 14.0, "explanation7", 2, "docent1");
		Workshop w8 = new Workshop("Geduld", future2, vm1, 42.0, "explanation8", 100, "docent2");
		Workshop w9 = new Workshop("Waterfietsen", now, vm2, 15.0, "explanation3 die heel lang is en heel langdradig netzo als de workshop bloemschikken want die is ontzettend saai en bloemen stinken vreselijk. raad iedereen aan om de workshop alles maken te volgen want die is veel leuker dan deze", 150, "docent3");
		Workshop w10 = new Workshop("Diepzee duiken voor gevorderden", future, vm1, 22.0, "explanation6", 100, "docent2");
		Workshop w11 = new Workshop("huishouden doen in 20 minuten", future, vm1, 14.0, "explanation7", 10, "docent1");
		Workshop w12 = new Workshop("Bezigheidstherapie", future, vm1, 42.0, "explanation8", 100, "docent2");
		Workshop w13 = new Workshop("Koekunde", future2, vm2, 15.0, "explanation3 die heel lang is en heel langdradig netzo als de workshop bloemschikken want die is ontzettend saai en bloemen stinken vreselijk. raad iedereen aan om de workshop alles maken te volgen want die is veel leuker dan deze", 150, "docent3");
		Workshop w14 = new Workshop("Diepzee duiken voor gevorderden", future2, vm1, 22.0, "explanation6", 100, "docent2");
		Workshop w15 = new Workshop("huishouden doen in 20 minuten", future2, vm1, 14.0, "explanation7", 10, "docent1");
		Workshop w16 = new Workshop("Bezigheidstherapie", future2, vm1, 42.0, "explanation8", 100, "docent2");
		Workshop w17 = new Workshop("Hond uitlaten", future3, vm1, 32.0, "explanation4", 100, "docent2");
		Workshop w18 = new Workshop("Schilderen", future3, vm1, 10.0, "explanation5", 2, "docent1");
		Workshop w19 = new Workshop("Niets doen", future3, vm1, 22.0, "explanation6", 100, "docent2");
		Workshop w20 = new Workshop("Laagvliegen", future4, vm1, 22.0, "explanation6", 5, "docent2");
		Workshop w21 = new Workshop("Chocolade melk maken", future4, vm1, 14.0, "explanation7", 10, "docent1");
		Workshop w22 = new Workshop("Nutteloos typen", future4, vm1, 42.0, "explanation8", 100, "docent2");
		Workshop w23 = new Workshop("Blindtypen", future4, vm2, 15.0, "explanation3 die heel lang is en heel langdradig netzo als de workshop bloemschikken want die is ontzettend saai en bloemen stinken vreselijk. raad iedereen aan om de workshop alles maken te volgen want die is veel leuker dan deze", 150, "docent3");
		Workshop w24 = new Workshop("Japens koken", future4, vm1, 22.0, "explanation6", 100, "docent2");
		Workshop w25 = new Workshop("Bier drinken", future5, vm1, 14.0, "explanation7", 10, "docent1");
		Workshop w26 = new Workshop("Bier brouwen", future5, vm1, 42.0, "explanation8", 100, "docent2");
		Workshop w27 = new Workshop("Fietsen zonder zijwieltjes", future5, vm1, 32.0, "explanation4", 100, "docent2");
		Workshop w28 = new Workshop("Ondersteboven lopen", future5, vm1, 10.0, "explanation5", 10, "docent1");
		Workshop w29 = new Workshop("Normaal doen", future5, vm1, 22.0, "explanation6", 100, "docent2");
		Workshop w30 = new Workshop("Kaasgooien", future5, vm1, 22.0, "gewoon kaas gooien", 2, "kaaskop");
		
		workshops.add(w1);workshops.add(w2);workshops.add(w3);workshops.add(w4);workshops.add(w5);
		workshops.add(w6);workshops.add(w7);workshops.add(w8);workshops.add(w9);workshops.add(w10);
		workshops.add(w11);workshops.add(w12);workshops.add(w13);workshops.add(w14);workshops.add(w15);
		workshops.add(w16);workshops.add(w17);workshops.add(w18);workshops.add(w19);workshops.add(w20);
		workshops.add(w21);workshops.add(w22);workshops.add(w23);workshops.add(w24);workshops.add(w25);
		workshops.add(w26);workshops.add(w27);workshops.add(w28);workshops.add(w29);workshops.add(w30);
		
		SubscriptionList subscriptions = new SubscriptionList(server, workshops, clients);
		subscriptions.clearDatabaseTable();
		subscriptions.add(new Subscription(c1,w1));
		subscriptions.add(new Subscription(c1,w2));
		subscriptions.add(new Subscription(c1,w5));
		subscriptions.add(new Subscription(c1,w5));
		subscriptions.add(new Subscription(c2,w5));
		subscriptions.add(new Subscription(c3,w7));
		subscriptions.add(new Subscription(c3,w7));
		subscriptions.add(new Subscription(c3,w7));
		subscriptions.add(new Subscription(c4,w8));
		subscriptions.add(new Subscription(c5,w9));
		subscriptions.add(new Subscription(c6,w9));
		subscriptions.add(new Subscription(c7,w1));
		subscriptions.add(new Subscription(c8,w2));
		subscriptions.add(new Subscription(c9,w3));
		subscriptions.add(new Subscription(c10,w23));
		subscriptions.add(new Subscription(c11,w23));
		subscriptions.add(new Subscription(c12,w12));
		subscriptions.add(new Subscription(c13,w28));
		subscriptions.add(new Subscription(c14,w28));
		subscriptions.add(new Subscription(c15,w30));
		
		PaymentList payments = new PaymentList(server, clients);
		payments.clearDatabaseTable();
		payments.add(new Payment(c1, 25, now, "I`ve made a comment."));
		payments.add(new Payment(c2, 100, now, "I`ve made no comment."));
		payments.add(new Payment(c3, 23, now, "I`ve made a comment."));
		payments.add(new Payment(c4, 150, now, "I`ve made no comment."));
		payments.add(new Payment(c5, 13, now, "I`ve made a comment."));
		payments.add(new Payment(c6, 35, now, "I`ve made no comment."));
		payments.add(new Payment(c7, 25, now, "I`ve made a comment."));
		payments.add(new Payment(c8, 1, now, "I`ve made no comment."));
		payments.add(new Payment(c1, 23, now, "I`ve made a comment."));
		payments.add(new Payment(c2, 53, now, "I`ve made no comment."));
		payments.add(new Payment(c3, 26, now, "I`ve made a comment."));
	}
}
